﻿using UnityEngine;

public class BaseFSMCtrl<T> : BaseMono
{
	public FSMMachine FSM;

	public virtual void InitFSM(T t)
	{
		base.Init();
	}

	public override void onUpdate() {
		if (FSM != null)
		{
			FSM.CheckStateDone();
		}
	}

	protected void ProccessState(BaseState<T> state, object args = null)
	{
		FSM.ProccessState(state, args);
	}

	public void Reset()
	{
		FSM.ToDefaultState();
	}
}